import request from '@/utils/request'

export function getComplaintList(query) {
  if(query != undefined){
    query = JSON.parse(JSON.stringify(query))
  }
  return request({
    url: '/knowledge/complaint/getList',
    method: 'post',
    data: query
  })
}

export function getComplaintDetail(id) {
  return request({
    url: '/knowledge/complaint/getDetail',
    method: 'post',
    data: id
  })
}
export function changeStatusByComplaintID(id) {
  return request({
    url: '/knowledge/complaint/change-status',
    method: 'post',
    data: id
  })
}

export function saveComplaint(formdata) {
  return request({
    url: '/knowledge/complaint/save',
    method: 'post',
    data: formdata
  })
}

export function deleteComplaintByID(id) {
  return request({
    url: '/knowledge/complaint/delete',
    method: 'post',
    data: id
  })
}
export function removeComplaintByID(id) {
  return request({
    url: '/knowledge/complaint/remove',
    method: 'post',
    data: id
  })
}

export function getComplaintAvabile() {
  return request({
    url: '/knowledge/complaint/getAvailable',
    method: 'post'
  })
}

export function resetComplaintByID(data) {
  return request({
    url: '/knowledge/complaint/reset',
    method: 'post',
    data: data
  })
}

